import os
import time

class Clock:

    def __init__(self, hour, minitu, second) -> None:
        self.h = hour
        self.m = minitu
        self.s = second
    
    def show(self):
        return f'{self.h:0>2d}:{self.m:0>2d}:{self.s:0>2d}'

    def run(self):
        """走字"""
        self.s += 1
        if self.s == 60:
            self.s = 0
            self.m += 1
            if self.m == 60:
                self.m = 0
                self.h += 1
                if self.h == 24:
                    self.h = 0
            

if __name__ == '__main__':
    clock = Clock(23, 59, 55)
    while True:
        os.system('cls')
        print(clock.show())
        
        time.sleep(1)
        clock.run()
